68
Beginner’s Guide to Code Algorithms
68
This is because typically a Sudoku has 70 blank squares, hence, there can be 970 com
binations that you will need to test. This is a staggering sum of 6,265,787,482,177,97
0,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000! This is
likely to take a long time for the processor to calculate.
In this chapter you also learned the following coding terms:
• Arrays
• How to navigate a matrix
• How to call other programs (subroutines or “Subs” from one program)
• Nested If Statements
• Nested For statements
I want to leave you with a problem—what if you want to generate a game instead of
solving it? How would you develop the algorithm for it? Remember that any arrange
ment of 81 squares, some of which are unfilled, do not qualify to be a game. You must
be sure that it can be solved and that there is one and only one solution.